# jinjia2的判断语法
from flask import Flask,render_template

app = Flask(__name__)

@app.route("/book/list")
def book_list():
    books = [
        {
            "id":1,
            "name":"《三国演义》",
            "author":"罗贯中"
        },
        {
            "id": 2,
            "name": "《水浒传》",
            "author": "施耐庵"
        },
        {
            "id": 3,
            "name": "《西游记》",
            "author": "吴承恩"
        },
        {
            "id": 4,
            "name": "《红楼梦》",
            "author": "曹雪芹"
        }
    ]
    return render_template("book_list.html",books=books)


if __name__ == '__main__':
    app.run()